package com.colorfruit.admin.business.service;

import com.colorfruit.admin.pojo.entity.FoundationProduct;
import com.colorfruit.admin.pojo.entity.PrePurchaseOrder;
import com.colorfruit.admin.pojo.vo.prepurchase.PrePurchaseDetail;
import com.colorfruit.admin.pojo.vo.prepurchase.PrePurchaseOrderVo;
import com.colorfruit.admin.pojo.vo.product.FoundationProductVo;
import com.colorfruit.framework.model.pojo.BaseResult;

public interface ProductService {
    //*************商品******************//
    //添加商品
    BaseResult insertProduct(FoundationProductVo foundationProduct);
    //查询商品一二级json
    String selectTwoLevelProductList(String productName);
    //获取产品编辑数据
    BaseResult getProductEditInfo(Long productId);
    //编辑商品信息
    BaseResult editProduct(FoundationProduct foundationProduct);
    //删除商品信息
    BaseResult deleteProduct(Long id);

    //*************预采购******************//
    //添加预采购订单
    BaseResult insertPrePurchaseOrder(PrePurchaseOrderVo prePurchaseOrderVo);
    //查询当日预采购一二级json
    String selectTwoLevelPrePurchaseList(String userId, String productName, Byte recordStatus);
    //通过ID获取预采购订单数据
    PrePurchaseOrder getPreEditProductInfo(Long id);
    //编辑预采购订单
    BaseResult editPrePurchaseOrder(PrePurchaseOrderVo prePurchaseOrderVo);
    //查询商品预采购详情
    PrePurchaseDetail getPrePurchaseDetail(Long productId);

    //*************预上架******************//
    //生成预上架订单
    BaseResult generatePreOnShelfOrder(PrePurchaseDetail purchaseDetail,String auditName);
    //查询预上架商品列表
    BaseResult selectPreOnShelfProductList(String productName, int page, int size);
    //计算价格
    BaseResult countSalePrice(String prePurchaseOrderIds);
    //商品是否可以被采购
    BaseResult canBePurchased(Long productId);
}
